GtkLabelAccessible: Initialize link before setting parent
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 23 Nov 2016 15:34:15 +0000 (16:34 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 23 Nov 2016 23:55:42 +0000 (18:55 -0500)
Since at-spi-atk commit 96621a5e95 fixed PropertyChange notifications
for AccessibleParent, setting the parent will result in a call to
ref_state_set() which assumes that the object is fully initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=774939

gtk/a11y/gtklabelaccessible.c

index f676f7ceefbac1f55580a29945d18f7b762c3d8e..0cdb6e0c582a71babaa11ecc65656f5a7ee3b9e6 100644 (file)
@@ -158,8 +158,8 @@ gtk_label_accessible_link_impl_new (GtkLabelAccessible *label,
   GtkLabelAccessibleLinkImpl *impl;
 
   impl = g_object_new (_gtk_label_accessible_link_impl_get_type (), NULL);
-  atk_object_set_parent (ATK_OBJECT (impl), ATK_OBJECT (label));
   impl->link = gtk_label_accessible_link_new (label, idx);
+  atk_object_set_parent (ATK_OBJECT (impl), ATK_OBJECT (label));
 
   return impl;
 }